package com.hugedata.cdn.startup;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * 
 * 项目名称：cdn 类名称：ContextRootListener 类描述： 创建人：zhaoaihua 创建时间�?013-3-21 下午1:04:21
 * 修改备注�?
 * 
 * @version
 * 
 */
public class ContextRootListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        String webroot = servletContextEvent.getServletContext().getRealPath(
                "/");
        System.setProperty("webapp.root", webroot);
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletContextEvent) {}
}
